<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link href="images/reset.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="images/system.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="images/table_form.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="{yun:}$config.sy_weburl{/yun}/js/layui/css/layui.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet">
<script src="{yun:}$config.sy_weburl{/yun}/js/jquery-1.8.0.min.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="js/admin_public.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
<script src="{yun:}$config.sy_weburl{/yun}/js/ueditor/ueditor.config.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="{yun:}$config.sy_weburl{/yun}/js/ueditor/ueditor.all.min.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="{yun:}$config.sy_weburl{/yun}/js/layui/layui.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
<script src="{yun:}$config.sy_weburl{/yun}/js/layui/phpyun_layer.js?v={yun:}$config.cachecode{/yun}"></script>
<script language="javascript">var weburl="{yun:}$config.sy_weburl{/yun}";</script>
<style>
* {
  margin: 0;
  padding: 0;
}
body, div {
  margin: 0;
  padding: 0;
}
</style>
<title>后台管理</title>
</head>
<body class="body_ifm">
<div class="infoboxp">
<div class="admin_new_tip">
<a href="javascript:;" class="admin_new_tip_close"></a>
<a href="javascript:;" class="admin_new_tip_open" style="display:none;"></a>
<div class="admin_new_tit"><i class="admin_new_tit_icon"></i>操作提示</div>
<div class="admin_new_tip_list_cont">
<div class="admin_new_tip_list">该页面可对职位进行编辑修改操作。</div>
</div>
</div>
  
  <div class="infoboxp_top mt10">
    <h6>职位详情</h6>
        <a href="javascript:history.back();" class="admin_new_cz_tj">返回</a>
  </div>
  <div class="admin_table_border">
  <iframe id="supportiframe"  name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe>
  <form class="layui-form" action="" target="supportiframe" method="post" onSubmit="return check_form_job()">
    <table width="100%" class="table_form" style="background:#fff;">
      {yun:}if $show.id{/yun}
      <tr >
        <th>招聘编号：</th>
        <td><div class="yun_admin_divh">{yun:}$show.id{/yun}</div></td>
      </tr>
      {yun:}/if{/yun}
      <tr class="admin_table_trbg" >
        <th>招聘名称：</th>
        <td><input type="text" name="name" id="name" class="input-text" size="30" value="{yun:}$show.name{/yun}"></td>
      </tr>
      <tr >
        <th>从事行业：</th>
        <td>
          <div class="layui-form-item">
         <div class="layui-input-block">
          <div class="layui-input-inline">
            <select name="hy" id="hy" lay-verify="" >
            <option>请选择</option>
             {yun:}foreach from=$industry_index item=v{/yun}
              <option  value="{yun:}$v{/yun}"
               {yun:}if $show.hy==$v{/yun}
                selected
                  {yun:}/if{/yun}
                  > {yun:}$industry_name[$v]{/yun}
                </option>
                {yun:}/foreach{/yun}
              </select>
              </div>
            </div>
          </div>
          
          </td>
      </tr>
      <tr class="admin_table_trbg" >
        <th>职位类别：</th>
        <td>
                 <div class="layui-form-item">
          <div class="layui-input-inline">
            <select name="job1" id="job1" lay-filter="job1">
              <option value="">请选择</option>
              {yun:}foreach from=$job_index key=j item=v{/yun}
              <option value="{yun:}$v{/yun}" {yun:}if $show.job1 == $v{/yun} selected{yun:}/if{/yun}
                >{yun:}$job_name[$v]{/yun}
              </option>
              {yun:}/foreach{/yun}
            </select>
          </div>
          <div class="layui-input-inline">
            <select name="job1_son" lay-filter="job1_son" id="job1_son">
              <option value="">请选择</option>
              {yun:}foreach from=$job_type[$show.job1] key=j item=v{/yun}
              <option value="{yun:}$v{/yun}" {yun:}if $show.job1_son==$v{/yun} selected{yun:}/if{/yun}
                >{yun:}$job_name[$v]{/yun}
              </option>
              {yun:}/foreach{/yun}
            </select>
          </div>
          <div class="layui-input-inline">
            <select name="job_post" lay-filter="job_post" id="job_post">
              <option value="">请选择</option>
              {yun:}foreach from=$job_type[$show.job1_son] key=j item=v{/yun}
              <option value="{yun:}$v{/yun}" {yun:}if $show.job_post==$v{/yun} selected{yun:}/if{/yun}
                >{yun:}$job_name[$v]{/yun}
              </option>
              {yun:}/foreach{/yun}
            </select>
          </div>
        </div> 
         </td>
      </tr>
      <tr >
        <th>工作地点：</th>
        <td>
          <div class="layui-form-item">
          <div class="layui-input-inline">
            <select name="provinceid" id="provinceid" lay-filter="citys">
              <option value="">请选择</option>
              {yun:}foreach from=$city_index key=j item=v{/yun}
              <option value="{yun:}$v{/yun}" {yun:}if $show.provinceid == $v{/yun} selected{yun:}/if{/yun}
                >{yun:}$city_name[$v]{/yun}
              </option>
              {yun:}/foreach{/yun}
            </select>
          </div>
          <div class="layui-input-inline">
            <select name="cityid" lay-filter="citys" id="cityid">
              <option value="">请选择</option>
              {yun:}foreach from=$city_type[$show.provinceid] key=j item=v{/yun}
              <option value="{yun:}$v{/yun}" {yun:}if $show.cityid==$v{/yun} selected{yun:}/if{/yun}
                >{yun:}$city_name[$v]{/yun}
              </option>
              {yun:}/foreach{/yun}
            </select>
          </div>
          <div class="layui-input-inline">
            <select name="three_cityid" lay-filter="three_cityid" id="three_cityid">
              <option value="">请选择</option>
              {yun:}foreach from=$city_type[$show.cityid] key=j item=v{/yun}
              <option value="{yun:}$v{/yun}" {yun:}if $show.three_cityid==$v{/yun} selected{yun:}/if{/yun}
                >{yun:}$city_name[$v]{/yun}
              </option>
              {yun:}/foreach{/yun}
            </select>
          </div>
        </div> 
          
         </td>
      </tr>
      <tr class="admin_table_trbg" >
        <th width="120">薪水待遇：</th>
        <td>
        <div class="admin_job_xz_box">
            <input type="text" name="minsalary" id="minsalary" class="admin_job_xz" size="3" value="{yun:}$show.minsalary{/yun}" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" placeholder="最低薪资"{yun:}if !$show.minsalary&&!$show.maxsalary&&$show.id{/yun} disabled="disabled"{yun:}/if{/yun}>
            <span class="admin_job_xz_box_dw">元/月</span>
        </div>
        <span class="admin_job_xz_box_line">-</span>
        <div class="admin_job_xz_box">
            <input type="text" name="maxsalary" id="maxsalary" class="admin_job_xz" size="5" value="{yun:}if $show.maxsalary{/yun}{yun:}$show.maxsalary{/yun}{yun:}/if{/yun}" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')"placeholder="最高薪资"{yun:}if !$show.minsalary&&!$show.maxsalary&&$show.id{/yun} disabled="disabled"{yun:}/if{/yun}>
             <span class="admin_job_xz_box_dw">元/月</span>
        </div>
        <span class="admin_job_xz_box_line">
        <input type="checkbox" id="salary_type" name="salary_type"  title="面议" value="1" {yun:}if !$show.minsalary&&!$show.maxsalary&&$show.id{/yun} checked="checked"{yun:}/if{/yun} lay-filter="salary_type" />   
    </span>
        </td>
      </tr>
    
      <tr class="admin_table_trbg" >
        <th width="120">招聘人数：</th>
        <td>
        <div class="layui-form-item">
         <div class="layui-input-block">
          <div class="layui-input-inline">
            <select name="number" id="number" lay-verify="" >
            <option>请选择</option>
             {yun:}foreach from=$comdata.job_number item=v{/yun}
              <option  value="{yun:}$v{/yun}"
               {yun:}if $show.number==$v{/yun}
                selected
                  {yun:}/if{/yun}
                  > {yun:}$comclass_name[$v]{/yun}
                </option>
                {yun:}/foreach{/yun}
              </select>
              </div>
            </div>
          </div>
          
         </td>
      </tr>
      <tr >
        <th width="120">工作经验：</th>
        <td>
        <div class="layui-form-item">
         <div class="layui-input-block">
          <div class="layui-input-inline">
            <select name="exp" id="exp" lay-verify="" >
            <option>请选择</option>
             {yun:}foreach from=$comdata.job_exp item=v{/yun}
              <option  value="{yun:}$v{/yun}"
               {yun:}if $show.exp==$v{/yun}
                selected
                  {yun:}/if{/yun}
                  > {yun:}$comclass_name[$v]{/yun}
                </option>
                {yun:}/foreach{/yun}
              </select>
              </div>
            </div>
          </div>
          
         </td>
      </tr>
      <tr class="admin_table_trbg" >
        <th width="120">到岗时间：</th>
        <td>
          <div class="layui-form-item">
         <div class="layui-input-block">
          <div class="layui-input-inline">
            <select name="report" id="report" lay-verify="" >
            <option>请选择</option>
             {yun:}foreach from=$comdata.job_report item=v{/yun}
              <option  value="{yun:}$v{/yun}"
               {yun:}if $show.report==$v{/yun}
                selected
                  {yun:}/if{/yun}
                  > {yun:}$comclass_name[$v]{/yun}
                </option>
                {yun:}/foreach{/yun}
              </select>
              </div>
            </div>
          </div>
          
          </td>
      </tr>
      <tr class="admin_table_trbg" >
        <th width="120">年龄要求：</th>
        <td>
        <div class="layui-form-item">
         <div class="layui-input-block">
          <div class="layui-input-inline">
            <select name="age" id="age" lay-verify="" >
            <option>请选择</option>
             {yun:}foreach from=$comdata.job_age item=v{/yun}
              <option  value="{yun:}$v{/yun}"
               {yun:}if $show.age==$v{/yun}
                selected
                  {yun:}/if{/yun}
                  > {yun:}$comclass_name[$v]{/yun}
                </option>
                {yun:}/foreach{/yun}
              </select>
              </div>
            </div>
          </div>
          
          </td>
      </tr>
      <tr >
        <th width="120">性　　别：</th>
        <td>
            <div class="layui-form-item">
       <div class="layui-input-block">
        <div class="layui-input-inline">
          <select name="sex" lay-filter="" id="sex">
          <option>请选择</option>
           {yun:}foreach from=$arr_data.sex item=v key=j{/yun}
            <option  value="{yun:}$j{/yun}"
             {yun:}if $show.sex==$j{/yun}
              selected
                {yun:}/if{/yun}
                > {yun:}$v{/yun}
              </option>
              {yun:}/foreach{/yun}
            </select>
            </div>
          </div>
        </div>   
         </td>
      </tr>
      <tr class="admin_table_trbg" >
        <th width="120">教育程度：</th>
        <td>
      <div class="layui-form-item">
         <div class="layui-input-block">
          <div class="layui-input-inline">
            <select name="edu" id="edu" lay-verify="" >
            <option>请选择</option>
             {yun:}foreach from=$comdata.job_edu item=v{/yun}
              <option  value="{yun:}$v{/yun}"
               {yun:}if $show.edu==$v{/yun}
                selected
                  {yun:}/if{/yun}
                  > {yun:}$comclass_name[$v]{/yun}
                </option>
                {yun:}/foreach{/yun}
              </select>
              </div> &nbsp;&nbsp;
              
              <input name="is_graduate" title="可接受应届生" type="checkbox" value="1" {yun:}if $show.is_graduate{/yun}checked{yun:}/if{/yun}/>
            </div>
          </div>
          
         </td>
      </tr>
      <tr >
        <th width="120">婚姻状况：</th>
        <td>
          <div class="layui-form-item">
         <div class="layui-input-block">
          <div class="layui-input-inline">
            <select name="marriage" id="marriage" lay-verify="" >
            <option>请选择</option>
             {yun:}foreach from=$comdata.job_marriage item=v{/yun}
              <option  value="{yun:}$v{/yun}"
               {yun:}if $show.marriage==$v{/yun}
                selected
                  {yun:}/if{/yun}
                  > {yun:}$comclass_name[$v]{/yun}
                </option>
                {yun:}/foreach{/yun}
              </select>
              </div>
            </div>
          </div>
          
         </td>
      </tr>
     
      <tr class="admin_table_trbg" >
        <th width="120">语言要求：</th>
        <td >
    <div class="layui-form-item">
            <div class="layui-input-block">
              {yun:}foreach key=j item=v from=$comdata.job_lang{/yun}
              <input name="lang[]" title="{yun:}$comclass_name[$v]{/yun}" value="{yun:}$v{/yun}" {yun:}if in_array($v,$show.lang){/yun} checked="checked" {yun:}/if{/yun} type="checkbox">
            {yun:}/foreach{/yun}
            
            </div>
          </div>
      </td>
      </tr>
     
      
      <tr class="admin_table_trbg" >
        <th width="120">描述职位：</th>
        <td>
    <script id="myEditor" name="content" type="text/plain" style="width:500px;height:200px;">{yun:}$show.description{/yun}
    </script>
    </td>
      </tr>
      
      <tr>
        <th width="120">浏览次数：</th>
        <td><input type="text" class="input-text" name="jobhits" size="10" value="{yun:}$show.jobhits{/yun}"></td>
      </tr>
      {yun:}if $show.id{/yun}
      <tr class="admin_table_trbg" >
        <th width="120">状　　态：</th>
        <td><div class="yun_admin_divh">{yun:}if $show.state==1{/yun}<font color="blue">已审核</font>{yun:}elseif $show.state==3{/yun}<font color="red">未通过</font>{yun:}else{/yun}<font color="red">未审核</font>{yun:}/if{/yun}</div></td>
      </tr>
      {yun:}/if{/yun}
      <tr>
        <th width="120"></th>
        <td><input type="hidden" name="pytoken" value="{yun:}$pytoken{/yun}"/>
          {yun:}if $show.id{/yun}
          <input type="hidden" name="lasturl" value="{yun:}$lasturl{/yun}">
          <input type="hidden" name="id" value="{yun:}$show.id{/yun}">
          <input class="layui-btn layui-btn-normal" type="submit" name="update" value="&nbsp;修 改&nbsp;" />
          {yun:}else{/yun}
          <input type="hidden" name="uid" value="{yun:}$uid{/yun}">
          <input class="layui-btn layui-btn-normal" type="submit" name="update" value="&nbsp;保 存&nbsp;" />
          {yun:}/if{/yun} </td>
      </tr>
    </table>
  </form>
</div>
</div>
<script>
UE.getEditor('myEditor',{
  toolbars:[['Source','|','Bold', 'italic', 'underline', 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright','insertorderedlist', 'insertunorderedlist','emotion','simpleupload']],
  wordCount:false,
    elementPathEnabled:false,
    initialFrameHeight:200
});
</script>
<script type="text/javascript">
var weburl="{yun:}$config.sy_weburl{/yun}";
var form ,
url1=weburl+"/index.php?m=ajax&c=get_job_option",
url = weburl+"/index.php?m=ajax&c=get_city_option";

layui.use(['layer', 'form','laydate'], function(){
  var form = layui.form,
    laydate = layui.laydate,
    $ = layui.$;

	form.on('checkbox(salary_type)', function(data){
    if(data.elem.checked){
      $("#minsalary").attr("disabled","disabled");
      $("#maxsalary").attr("disabled","disabled");
      $("#minsalary").val(0);
      $("#maxsalary").val(0);
    }else if(!data.elem.checked){
      $("#minsalary").removeAttr("disabled","disabled");
      $("#maxsalary").removeAttr("disabled","disabled");
      $("#minsalary").val('{yun:}$show.minsalary{/yun}');
      $("#maxsalary").val('{yun:}$show.maxsalary{/yun}');
    }
    });

  form.on('select(job1)', function(data){
    $.post(url1,{job1_son : data.value},function(html){
      $("#job1_son").html(html);
      $("#job_post").html('<option value="">请选择</option>');
      form.render();
    });
  });
  
  form.on('select(job1_son)', function(data){
    $.post(url1,{job1_son : data.value},function(html){
      $("#job_post").html(html);
      form.render();
    });
  });
  function check_form_job(){
	 	var name = $.trim($("#name").val());
		var minsalary=$.trim($("#minsalary").val());
		var maxsalary=$.trim($("#maxsalary").val());
		if($("#salary_type").attr("checked")!='checked'){
		if(minsalary==''||minsalary=='0'){
			parent.layer.msg('请填写工资！', 2, 8);return false;
		}
		if(maxsalary){
			if(parseInt(maxsalary)<=parseInt(minsalary)){
				parent.layer.msg('最高工资必须大于最低工资！', 2, 8);return false;
			}
		}
		}
		if(name==''){
			parent.layer.msg('职位名称不能为空！',2,8);return false;
		}
		if($("#job1_son").val()==''){
			parent.layer.msg('请选择职位类别！',2,8);return false;
		}

		if($("#provinceid").val()==''){
			parent.layer.msg('请选择工作地点！',2,8);return false;
		}
		var content = editor.getContent(); 
		if(content==""){
			parent.layer.msg('职位描述不能为空！',2,8);return false;
		}else{
			$("#content").val(content);
		}
	}
});



</script>
<script language=javascript src='{yun:}$config.sy_weburl{/yun}/data/plus/city.cache.js?v={yun:}$config.cachecode{/yun}'>
</script>
<script language=javascript src='{yun:}$config.sy_weburl{/yun}/js/city.js?v={yun:}$config.cachecode{/yun}'>
</script>
</body>
</html>